package cn.like.redis;


import cn.like.redis.support.key;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

/**
 * desc: Redis 工具类 <br>
 *
 * @author like 980650920@qq.com
 * @date 2021-07-08 18:57:07
 */
@Component
public class RedisService {

    private final StringRedisTemplate redisTemplate;
    /**
     * -------------------key相关操作---------------------
     */
    public final cn.like.redis.support.key Key;
    /**
     * -------------------string相关操作---------------------
     */
    public final cn.like.redis.support.string String;
    /*
     * -------------------hash相关操作-------------------------
     */
    public final cn.like.redis.support.hash Hash;
    /**
     * ---------------------     ---list相关操作----------------------------
     */
    public final cn.like.redis.support.list List;
    /**
     * --------------------set相关操作--------------------------
     */
    public final cn.like.redis.support.set Set;
    /**
     * ------------------zSet相关操作--------------------------------
     */
    public final cn.like.redis.support.zSet ZSet;

    public RedisService(StringRedisTemplate redisTemplate,
                        key key, cn.like.redis.support.string string,
                        cn.like.redis.support.hash hash,
                        cn.like.redis.support.list list,
                        cn.like.redis.support.set set,
                        cn.like.redis.support.zSet zSet) {
        this.redisTemplate = redisTemplate;
        this.Key = key;
        this.String = string;
        this.Hash = hash;
        this.List = list;
        this.Set = set;
        this.ZSet = zSet;
    }

    public StringRedisTemplate getRedisTemplate() {
        return this.redisTemplate;
    }
}